<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改用户-角色</title>
<link rel="stylesheet" type="text/css" href="<c:url value="/styles/sample.css"/>"/>
</head>
<body>
<div id="box">
        <div class="title">Apache Shiro Sample App - Edit User-Roles</div>
	
        <div class="content">
        
      	==========${user.username }，当前所拥有的角色是：=============
        <c:forEach var="role" items="${user.roles}">
        		<div style="cursor:pointer;" id="${role.id }">${role.id }：${role.name }</div>
        </c:forEach>
         
        ==========${user.username }，当前您没有拥有的角色是：=============-->
        
        <c:forEach var="role" items="${roles}">
        		<div style="cursor:pointer;" id="${role.id }">${role.id }：${role.name }</div>
        	
        </c:forEach>
        <form action="<c:url value="/modifyUserRoles"/>" method="post">
        	<input type="hidden" id="userId" name="userId" value="${user.id}">
           增加角色：<input type="text" id="addRole" name="addRole"></br>
           减少角色：<input type="text" id="minusRole" name="minusRole"/> 	 
           <input type="submit" value="提交信息"/>
		</form>
            
        </div>
    </div>
</body>
</html>